package listener

import (
	"github.com/go-vgo/robotgo"
	"mks/message"
)

func HandleMouseMessage(m *message.MouseMessage) {
	//return
	//println(m.Kind)
	switch m.Kind {
	case message.EventType_MouseMove:
		robotgo.Move(int(m.X), int(m.Y))
	case message.EventType_MouseDown:
		//switch m.Button {
		//case message.MouseButton_Left:
		//	robotgo.Click("left", true)
		//case message.MouseButton_Right:
		//	robotgo.Click("right", true)
		//case message.MouseButton_Middle:
		//	robotgo.Click("middle", true)
		//}
	case message.EventType_MouseUp:
		//暂时无法做出 todo
	case message.EventType_MouseWheel:
		//robotgo.Scroll(0, -2*int(m.Rotation))
	}
}
